<!DOCTYPE html>
<html>
    <body>
        <!-- livestream.html -->
<video width="640" height="360"
autoplay controls autobuffer 
src="http://ivi.bupt.edu.cn/hls/cctv1hd.m3u8"
type="application/vnd.apple.mpegurl">
</video>
    </body>
    <script>
        var el = document.getElementById("play-btn")
        el.addEventListener('click', function () {
            window.videojs('video-play', {}, function onPlayerReady () {
             this.play()
             this.on('ended', function () {
                 console.log('ended, video js')
             })
           })
        })
    </script>
</html>